<!DOCTYPE html>
<html>
<%include html-head%>
<body>
	<div data-role="page" id="dirManager">
		<div role="main" class="ui-content">
			<div class="ui-grid-a">
				<div class="ui-block-a" style="width: 300px">
					<ul data-role="listview" data-inset="true">
						<li data-icon="home"><a href="/">Home</a></li>
					</ul>
				</div>
				<div class="ui-block-b" style="margin-left: 30px">
					<div class="ui-bar ui-bar-a ui-corner-all ">
						<div data-role="controlgroup" data-type="horizontal"
							style="float: left;">
							<h3 >Change password :</h3>
						</div>
					</div>
					<form class="ui-body ui-body-a ui-corner-all" id="folderForm"
						method="POST">

						<input id="password" type="text" name="password"
							maxlength="14" />
						<input type=button id="submit" value="ok" type="submit">
					</form>
				</div>

			</div>
			<script type="text/javascript">
                $("#submit").click(function() {
                    var password = $('#password').val();
                    $(this).ajaxSubmit({
                        url : ('/_savePassword'),
                        type : 'post',
                        data : {
                            password : password
                        },
                        error : function(err) {
                            showMsgPopup("save password err: " + err);
                        },
                        success : function(result) {
                            if (result == "ok") {
                                showMsgPopup("setting password ok!");
                                window.location.href = '/';
                            } else {
                                showMsgPopup("" + result);
                            }
                        }
                    });
                    // $.mobile.changePage("/_passwordOk");
                });
            </script>
		</div>
	</div>
</body>
</html>